package com.zzyl.nursing.controller.member;

import com.zzyl.common.core.controller.BaseController;
import com.zzyl.common.core.domain.R;
import com.zzyl.common.core.page.TableDataInfo;
import com.zzyl.nursing.domain.NursingProject;
import com.zzyl.nursing.service.IMemberOrderService;
import com.zzyl.nursing.service.INursingProjectService;
import com.zzyl.nursing.vo.MemberOrderVo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
import java.util.Map;

/**
 * @Description MemberOrder
 * @Author yhy
 * @Date 2025-03-03 11:05
 */
@RestController
@RequestMapping("/member/order")
@Api(tags = "小程序端-服务项接口")
public class MemberOrderController extends BaseController {
    @Autowired
    INursingProjectService  nursingProjectService;
    @Autowired
    IMemberOrderService memberOrderService;
    /**
     * 查询护理项目列表
     */
    @ApiOperation("查询护理项目列表")
    @PreAuthorize("@ss.hasPermi('serve:project:list')")
    @GetMapping("/project/page")
    public R<Map<String, Object>> listProjectByPage(@RequestParam(required = false) String name,
                                                    @RequestParam(required = false, defaultValue = "1") Integer pageNum,
                                                    @RequestParam(required = false, defaultValue = "10") Integer pageSize,
                                                    @RequestParam(required = false) Integer status) {
        Map<String, Object> result = memberOrderService.listProjectByPage(name, pageNum, pageSize, status);
        return R.ok(result);
    }

}
